ostree-init: Also trim trailing newline from arguments
authorColin Walters <walters@verbum.org>
Mon, 21 Nov 2011 01:49:45 +0000 (20:49 -0500)
committerColin Walters <walters@verbum.org>
Mon, 21 Nov 2011 01:49:45 +0000 (20:49 -0500)
Otherwise the parsed argument is corrupted.

gnomeos/yocto/recipies-core/ostree-init/ostree-init.c

index 952f8ea09a2bea5512cf4572fd40f98f56591c87..63452f45ac4febbd969666be796d0e18e70ef3c3 100644 (file)
@@ -79,6 +79,9 @@ parse_arg (const char *cmdline, const char *arg)
          const char *start = p + arglen;
          const char *end = strchr (start, ' ');
 
+         if (!end)
+           end = strchr (start, '\n');
+
          if (is_eq)
            {
              if (end)